<h3 class="info-tag">
    申请列表(共{$page_total}个记录) 金额统计:<span>￥{$total}</span> 手续费:<span>￥{$fee}</span>
</h3>

<div class="html-box">
    <form class="cond-form clear" action="#!member/member_account" id="searchForm" method="get">
        <input type="hidden" value="" name="page" id="page">
        <div class="f-unit">
            <select name="k" id="k">
                <option value="username" {if $smarty.get.k eq 'username'}selected{/if}>会员名</option>
                <option value="pay_name" {if $smarty.get.k eq 'pay_name'}selected{/if}>支付方式</option>
            </select>
            <input id="q" class="form-i w160 sitem" name="q" value="{$smarty.get.q}" type="text">
            <label class="ui-label w60">操作类型：</label>
            <div class="l">
                <select name="type">
                    <option value="">请选择</option>
                    <option value="1" {if $smarty.get.type eq 1}selected{/if}>充值</option>
                    <option value="2" {if $smarty.get.type eq 2}selected{/if}>提现</option>
                </select>
            </div>
            <label class="ui-label w60">到款状态：</label>
            <div class="l">
                <select name="status">
                    <option value="">请选择</option>
                    <option value="1" {if $smarty.get.status eq 1}selected{/if}>待付款</option>
                    <option value="2" {if $smarty.get.status eq 2}selected{/if}>已完成</option>
                    <option value="3" {if $smarty.get.status eq 3}selected{/if}>已取消</option>
                </select>
            </div>
            <label class="ui-label w60">支付方式：</label>
            <div class="l">
                <select name="pay_id">
                    <option value="">请选择</option>
                    {foreach from=$payment item=m}
                    <option value="{$m.pay_id}" {if $m.pay_id eq $smarty.get.pay_id}selected{/if}>{$m.pay_name}</option>
                    {/foreach}
                </select>
            </div>
            <label class="ui-label w60">申请时间：</label>
            <div class="l">
                <input class="form-i w120 sitem" name="start_time" value="{$smarty.get.start_time|strip_tags}" type="text" autocomplete="off" onclick="WdatePicker()">
                <input style="margin-left:-1px" class="form-i w120 sitem" name="end_time" value="{$smarty.get.end_time|strip_tags}" type="text"  autocomplete="off" onclick="WdatePicker()">
            </div>
            <button type="submit" style="margin-left:10px; margin-top:1px" class="uiBtn BtnBlue e2-member-searchlog-1">搜索</button>
        </div>
    </form>

    <table class="list">
        <thead>
        <tr>
            <th class="w30"><input type="checkbox" class="checkall"></th>
            <th class="w30">ID</th>
            <th>会员名称{if $smarty.get.type eq 1}/<span class="c-orange">真实姓名</span>{/if}</th>
            <th>手机</th>
            <th class="w80">操作类型</th>
            <th class="w80">金额</th>
            <th class="w100">手续费/到账</th>
            <th class="w160">支付方式{if $smarty.get.type eq 2}/<span class="c-orange">真实姓名</span>{/if}</th>
            <th class="w160">到款状态</th>
            <th class="w80">操作员</th>
            <th class="w120">申请时间</th>
            <th class="w80">操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach from=$list item=m}
        <tr class="opera">
            <td><input type="checkbox" name="id" value="{$m.id}"></td>
            <td>{$m.id}</td>
            <td><a href="#!member/edit/{$m.mid}?act=show&com=xshow|会员信息({$m.mid})">{$m.username}</a> {if $m.type eq 1}<b class="c-orange">{$m.realname}</b>{/if}</td>
            <td>{$m.mobile}</td>
            <td>{if $m.type==1}充值{else}提现{/if}</td>
            <td><b style="color:#f80">{$m.amount}</b></td>
            <td><b style="color:#f80">{$m.fee}</b>{if $m.gotime}<span class="c-gray"> ({$m.gotime})</span>{/if}</td>
            <td>
                {$m.pay_name} {if $m.type eq 2}<b class="c-orange">{$m.realname}</b>{/if}
                {if $m.type eq 2}<br/>{$m.user_note}{/if}
            </td>
            <td>{if $m.status==1}待付款{else if $m.status==2}已完成{else}已取消{/if}</td>
            <td>{$m.admin_user}</td>
            <td>{date('Y-m-d H:i',$m.add_time)}</td>
            <td>
                <a href="#!member/member_account_edit/{$m.id}?com=xshow|充值/提现申请"  class='iconfont icon-a' title="编辑">&#xe603;</a>
                <a onclick="main.confirm_del('member/member_account_del','{$m.id}')"  class='iconfont icon-a'  title="删除">&#xe606;</a></td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="foot-btn">
        <div class="pager r">{$page}</div>
        <a class="uiBtn BtnGreen"  href="javascript:;" onclick="exportAccount()">导出Excel</a>&nbsp;&nbsp;<a class="uiBtn BtnBlue e2-member-batchAccount"  href="javascript:;">批量完成</a>
    </div>
</div>

<script src="/js/manage/member.js"></script>
{literal}
<script>
    $.loadJs('/admin/js/manage/member.js',function(){
    });
    var checkboxs=document.getElementsByName("id");

    $('.checkall').click(function(){
        var checkboxs=document.getElementsByName("id");
        for (var i=0;i<checkboxs.length;i++) {
            var e=checkboxs[i];
            e.checked=!e.checked;
        }
    });
    function exportAccount(){
        var arr = location.hash.split("?");
        var get = arr[1]?('?'+arr[1]):'';
        if(!get){
            com.xtip('导出量较大，请先进行筛选操作！',{type:1});
        }else{
            location.href='/manage/member/export_account'+get;
        }
    }

    var menus = $('#page_container a'), i;
    for(i = 0;i < menus.length;i++){
        menus[i].onclick = function() {
            var page = this.rel;
            member.search(page);
        }
    }
</script>
{/literal}